﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" 
    xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
    xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.about" 
    x:Class="HomeBuyerTools.BuyerTools" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
    

	<phone:PhoneApplicationPage.Resources>
        <SampleData:about x:Key="About" d:IsDataSource="True"/>
        <DataTemplate x:Key="ItemTemplate">
            <StackPanel>
                <TextBlock Text="{Binding name}" FontSize="48" Margin="0,0,0,40"/>
            </StackPanel>
        </DataTemplate>
        <Storyboard x:Name="SbHelp">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="image">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="image">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="SbFacebook">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="image1">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="image1">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="SbTwitter">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="image2">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="image2">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="SbYoutube">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="image3">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="image3">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="SbBlogger">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="image4">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="image4">
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <DataTemplate x:Key="ItemTemplate1">
        	<StackPanel>
                <TextBlock Text="{Binding name}" Margin="0,0,0,40"/>
        	</StackPanel>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>
    

    <!--Panorama-based applications should not show an ApplicationBar--><!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource About}}">
        <controls:Panorama Title="Home Buyer Tools" VerticalAlignment="Top">

            <!--Panorama item one-->
            <controls:PanoramaItem Header="Menu">

                <Grid x:Name="ContentPanel"  Margin="12,0,12,0">
                    <TextBlock Name="tbirate" Text="Interest Rate"  FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,30,0,0" Width="250" />
                    <TextBox Name="tbxirate" Text="" HorizontalAlignment="Left" VerticalAlignment="Top" Width="262" Margin="-12,70,0,0" ></TextBox>
                    <TextBlock Name="tbPrincipal" Text="Mortgage Principal"  FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,150,0,0" Width="250" />
                    <TextBox Name="tbxPrincipal" Text="" HorizontalAlignment="Left" VerticalAlignment="Top" Width="262" Margin="-12,180,0,0" ></TextBox>
                    <Button Content="Calculate" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-10,260,0,0" Width="250" Click="Button_Click" ></Button>
                </Grid>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Header="about" DataContext="{Binding Source={StaticResource About}}" RenderTransformOrigin="0.468,0.408">
                <Grid>
                    <Grid.RowDefinitions>
                    	<RowDefinition Height="Auto"/>
                    	<RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <!--Double line list with text wrapping-->
                    <ListBox Grid.Row="0" ItemTemplate="{StaticResource ItemTemplate1}" Name="ListBox" ItemsSource="{Binding Collection}" Margin="0,20,0,0" FontSize="48" VerticalAlignment="Top" SelectionChanged="ListBox_SelectionChanged" Height="400" FontFamily="Segoe WP" />
                    <StackPanel Grid.Row="1" VerticalAlignment="Bottom" Orientation="Horizontal" Height="80" Width="400" Margin="0,0,0,25">
                        <Image x:Name="image" Margin="8,10,10,10" Width="60" Height="60" Source="Images/Help.png" MouseLeftButtonDown="HelpImage_MouseLeftButtonDown" RenderTransformOrigin="0.5,0.5">
                            <Custom:Interaction.Triggers>
                                <Custom:EventTrigger EventName="MouseLeftButtonDown">
                                    <im:ControlStoryboardAction Storyboard="{StaticResource SbHelp}" />
                                </Custom:EventTrigger>
                            </Custom:Interaction.Triggers>
                            <Image.Projection>
                                <PlaneProjection />
                            </Image.Projection>
                            <Image.RenderTransform>
                                <CompositeTransform />
                            </Image.RenderTransform>
                        </Image>
                        <Image x:Name="image1" Margin="8,10,10,10" Width="60" Height="60" Source="Images/facebook.png" MouseLeftButtonDown="facebookImage_MouseLeftButtonDown" RenderTransformOrigin="0.5,0.5">
                            <Custom:Interaction.Triggers>
                                <Custom:EventTrigger EventName="MouseLeftButtonDown">
                                    <im:ControlStoryboardAction Storyboard="{StaticResource SbFacebook}" />
                                </Custom:EventTrigger>
                            </Custom:Interaction.Triggers>
                            <Image.Projection>
                                <PlaneProjection />
                            </Image.Projection>
                            <Image.RenderTransform>
                                <CompositeTransform />
                            </Image.RenderTransform>
                        </Image>
                        <Image x:Name="image2" Margin="8,10,10,10" Width="60" Height="60" Source="Images/twitter.png" MouseLeftButtonDown="twitterImage_MouseLeftButtonDown" RenderTransformOrigin="0.5,0.5">
                            <Custom:Interaction.Triggers>
                                <Custom:EventTrigger EventName="MouseLeftButtonDown">
                                    <im:ControlStoryboardAction Storyboard="{StaticResource SbTwitter}" />
                                </Custom:EventTrigger>
                            </Custom:Interaction.Triggers>
                            <Image.RenderTransform>
                                <CompositeTransform />
                            </Image.RenderTransform>
                        </Image>
                        <Image x:Name="image3" Margin="8,10,10,10" Width="60" Height="60" Source="Images/youtube.png" MouseLeftButtonDown="youtubeImage_MouseLeftButtonDown" RenderTransformOrigin="0.5,0.5">
                            <Custom:Interaction.Triggers>
                                <Custom:EventTrigger EventName="MouseLeftButtonDown">
                                    <im:ControlStoryboardAction Storyboard="{StaticResource SbYoutube}" />
                                </Custom:EventTrigger>
                            </Custom:Interaction.Triggers>
                            <Image.RenderTransform>
                                <CompositeTransform />
                            </Image.RenderTransform>
                        </Image>
                        <!--<Image x:Name="image4" Margin="8,10,10,10" Width="60" Height="60" Source="Images/blog.png">

                        </Image>-->
                        <Image x:Name="image4" Margin="8,10,10,10" Width="60" Height="60" Source="Images/blog.png" MouseLeftButtonDown="blogImage_MouseLeftButtonDown" RenderTransformOrigin="0.5,0.5">
                            <Custom:Interaction.Triggers>
                                <Custom:EventTrigger EventName="MouseLeftButtonDown">
                                    <im:ControlStoryboardAction Storyboard="{StaticResource SbBlogger}" />
                                </Custom:EventTrigger>
                            </Custom:Interaction.Triggers>
                            <Image.RenderTransform>
                                <CompositeTransform />
                            </Image.RenderTransform>
                        </Image>
                    </StackPanel>

                </Grid>
            </controls:PanoramaItem>

        </controls:Panorama>
       
    </Grid>

</phone:PhoneApplicationPage>